// 公用组件mixin
// loading
import loading from 'base/loading/loading.vue'

// 遮罩层
import masks from 'base/masks/masks.vue'

// 拖拽弹出框
import normalInteractModel from 'base/normal-interact-model/normal-interact-model.vue'

// 遮罩弹出框
import normalMaskModel from 'base/normal-mask-model/normal-mask-model.vue'

// 时间轴
import timeAxis from 'base/time-axis/time-axis.vue'

// 自定义滚动条
import scroll from 'base/scroll/scroll.vue'

// 左右无限滚动
import roll from 'base/roll/roll.vue'
export const loadingMixin = {
	components: {
		'loading': loading
	}
}
export const masksMixin = {
	components: {
		'masks': masks
	}
}
export const interactModelMixin = {
	components: {
		'interact-model': normalInteractModel
	}
}
export const maskModelMixin = {
	components: {
		'mask-model': normalMaskModel
	}
}
export const timeAxisMixin = {
	components: {
		'time-axis': timeAxis
	}
}
export const scrollMixin = {
	components: {
		'scroll': scroll
	}
}
export const rollMixin = {
	components: {
		'roll': roll
	}
}

// 组件公共  mixin
export const aPictureModelMixin = {
	data () {
		return {
			data: {}
		}
	},
	methods: {
		fliterData (key) {
			return this.data[key] || '--'
		},
		fliterStatus (key) {
			if (this.data[key] == 1) {
				return '正常'
			} else {
				return '停用'
			}
		}
	}
}
